import Vue from 'vue'
import Router from 'vue-router'
import Home from '@/views/home/Home.vue'

const OrderPay = () => import('@/views/my/OderPay.vue');
const Voucher = () => import('@/views/my/Voucher.vue');
const VoucherInfo = () => import('@/views/my/VoucherInfo.vue');
const Collect = () => import('@/views/my/Collect.vue');
const Participation = () => import('@/views/my/Participation.vue');
Vue.use(Router)

export default new Router({
  mode: 'history',
  base: process.env.BASE_URL, //  __dirname,     process.env.BASE_URL,
  routes: [
    {path: '/', name: 'home',component: Home},
    {path: '/wxLogin',name: 'wxLogin',component: () => import('./views/home/wxLogin.vue')},
    {path: '/activityDetail',name: 'activityDetail',component: () => import('./views/home/activityDetail.vue')},
    {path: '/personalInformation',name: 'personalInformation',component: () => import('./views/home/personalInformation.vue')},
    {path: '/registrationInformation',name: 'registrationInformation',component: () => import('./views/home/registrationInformation.vue')},
    {path: '/find',name: 'find',component: () => import('./views/find/find.vue')
      // route level code-splitting
      // this generates a separate chunk (about.[hash].js) for this route
      // which is lazy-loaded when the route is visited.
    },
    {path: '/my',name: 'my',component: () => import('./views/my/my.vue')},
    {path: '/oderPay',name: 'OderPay',component: OrderPay},
    {path: '/voucher',name: 'Voucher',component: Voucher},
    {path: '/voucherInfo',name: 'VoucherInfo',component: VoucherInfo},
    {path: '/collect',name: 'Collect',component: Collect},
    {path: '/Participation',name: 'Participation',component: Participation},
    // 核销端
    {path: '/login',name: 'login',component: () => import('./views/writeoff/login.vue')},
    {path: '/hx',name: 'write-off',component: () => import('./views/writeoff/write-off.vue')},
    {path: '/hxrecords',name: 'write-offRecords',component: () => import('./views/writeoff/write-offRecords.vue')}
  ]
})
